<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Password Dictionary Generator</title>
    <link rel="stylesheet" href="/static/style.css">
</head>
<body>
    <div class="container">
        <h1>Password Dictionary Generator</h1>
        <form action="/generate" method="POST">
            <div class="form-group">
                <label for="minLength">Minimum Length:</label>
                <input type="number" id="minLength" name="minLength" min="1" required>
            </div>
            <div class="form-group">
                <label for="maxLength">Maximum Length:</label>
                <input type="number" id="maxLength" name="maxLength" min="1" required>
            </div>
            <div class="form-group">
                <label>Character Set:</label>
                <div class="checkbox-group">
                    <label><input type="checkbox" name="charset" value="lowercase"> Lowercase Letters</label>
                    <label><input type="checkbox" name="charset" value="uppercase"> Uppercase Letters</label>
                    <label><input type="checkbox" name="charset" value="digits"> Digits</label>
                    <label><input type="checkbox" name="charset" value="special"> Special Characters</label>
                </div>
            </div>
            <div class="form-group">
                <label for="count">Number of Passwords:</label>
                <input type="number" id="count" name="count" min="1" required>
            </div>
            <button type="submit">Generate Passwords</button>
        </form>

        {{if .Passwords}}
        <div class="passwords-container">
            <h2>Generated Passwords</h2>
            <ul>
                {{range .Passwords}}
                <li>{{.}}</li>
                {{end}}
            </ul>
            <a href="/static/{{.Filename}}" class="download-btn">Download</a>
        </div>
        {{end}}
    </div>
</body>
</html>